package sketch.data;

import java.util.LinkedList;
import java.util.List;

//provide an annotation here
public class DataFactory {
	
	public final Object data;
	
	protected DataFactory(Object o) {this.data = o;}
	
	public static DataFactory getANewOne() {
		List<String> list = new LinkedList<String>();
		list.add("hello");
		return new DataFactory(list);
	}
	
	public static void main(String[] args) {
		DataFactory d = DataFactory.getANewOne();
	}
}

class MyDataFactory extends DataFactory {

	protected MyDataFactory(Object o) {
		super(o);
	}

	//decide which method are you calling
	public static MyDataFactory getNewOne() {
		List<String> list = new LinkedList<String>();
		list.add("hello");
		return new MyDataFactory(list);
	}
	
	//decide which method are you calling
	public static void main(String[] args) {
		DataFactory d = MyDataFactory.getNewOne();
	}
}